package cn.ibdsr.human.constant;

import lombok.Getter;
import lombok.Setter;

/**
 * @description:
 * @author: cdl
 * @email: iamcimon@qq.com
 * @date: 2021/8/3 16:56
 */
public enum ServerInitEnum {
    /**
     * 客服电话
     */
    SERVER_PHONE(0,"如有求职意向，请电话联系{phone}"),
    /**
     * 客服电话
     */
    CODE_LENGTH(1,"企业编号长度"),
    PICTURE_LENGTH(2,"轮播图数量上限"),
    ;

    /**
     * 状态值
     */
    @Setter
    @Getter
    private int type;
    /**
     * 状态描述
     */
    @Setter
    @Getter
    private String desc;


    ServerInitEnum(int type, String desc){
        this.type =type;
        this.desc= desc;
    }

    public static ServerInitEnum valueOf(int status) {
        for (ServerInitEnum s : ServerInitEnum.values()) {
            if (s.getType() == status) {
                return s;
            }
        }
        return null;
    }
}
